home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / OCEMail.p < prev    next >
Text File  |  1996-05-01  |  49KB  |  1,675 lines

  1. {
  2.      File:        OCEMail.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCEMail;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCEMAIL__}
  28. {$SETC __OCEMAIL__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCEMailIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __FILES__}
  35. {$I Files.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MEMORY__}
  38. {$I Memory.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __TEXTEDIT__}
  41. {$I TextEdit.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __TYPES__}
  44. {$I Types.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __DIGITALSIGNATURE__}
  47. {$I DigitalSignature.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __OCE__}
  50. {$I OCE.p}
  51. {$ENDC}
  52. {$IFC UNDEFINED __OCEAUTHDIR__}
  53. {$I OCEAuthDir.p}
  54. {$ENDC}
  55. {$IFC UNDEFINED __OCEMESSAGING__}
  56. {$I OCEMessaging.p}
  57. {$ENDC}
  58.  
  59. {$PUSH}
  60. {$ALIGN MAC68K}
  61. {$LibExport+}
  62.  
  63. {$IFC FOR_SYSTEM7_ONLY }
  64. { ************************************************************************************ }
  65. {  Common Definitions  }
  66. { ************************************************************************************ }
  67. {  reference to a new or open letter or message  }
  68.  
  69. TYPE
  70.     MailMsgRef                            = LONGINT;
  71. {  reference to an open msam queue  }
  72.     MSAMQueueRef                        = LONGINT;
  73. {  identifies slots managed by a PMSAM  }
  74.     MSAMSlotID                            = INTEGER;
  75. {  reference to an active mailbox  }
  76.     MailboxRef                            = LONGINT;
  77. {  identifies slots within a mailbox  }
  78.     MailSlotID                            = INTEGER;
  79. {  identifies a letter in a mailbox  }
  80.     MailSeqNumPtr = ^MailSeqNum;
  81.     MailSeqNum = RECORD
  82.         slotID:                    MailSlotID;
  83.         seqNum:                    LONGINT;
  84.     END;
  85.  
  86. {
  87.  A MailBuffer is used to describe a buffer used for an IO operation.
  88. The location of the buffer is pointed to by 'buffer'. 
  89. When reading, the size of the buffer is 'bufferSize' 
  90. and the size of data actually read is 'dataSize'.
  91. When writing, the size of data to be written is 'bufferSize' 
  92. and the size of data actually written is 'dataSize'.
  93. }
  94.     MailBufferPtr = ^MailBuffer;
  95.     MailBuffer = RECORD
  96.         bufferSize:                LONGINT;
  97.         buffer:                    Ptr;
  98.         dataSize:                LONGINT;
  99.     END;
  100.  
  101. {
  102.  A MailReply is used to describe a commonly used reply buffer format.
  103. It contains a count of tuples followed by an array of tuples.
  104. The format of the tuple itself depends on each particular call.
  105. }
  106.     MailReplyPtr = ^MailReply;
  107.     MailReply = RECORD
  108.         tupleCount:                INTEGER;
  109.                                                                         {  tuple[tupleCount]  }
  110.     END;
  111.  
  112. {
  113.  Shared Memory Communication Area used when Mail Manager sends 
  114. High Level Events to a PMSAM. 
  115. }
  116.     SMCAPtr = ^SMCA;
  117.     SMCA = RECORD
  118.         smcaLength:                INTEGER;                                {  includes size of smcaLength field  }
  119.         result:                    OSErr;
  120.         userBytes:                LONGINT;
  121.         CASE INTEGER OF
  122.         0: (
  123.             slotCID:            CreationID;                                {  for create/modify/delete slot calls  }
  124.             );
  125.         1: (
  126.             msgHint:            LONGINT;                                {  for kMailEPPCMsgOpened  }
  127.             );
  128.     END;
  129.  
  130. { ************************************************************************************ }
  131. {  Value of creator and types fields for messages and blocks defined by MailManager  }
  132.  
  133. CONST
  134.     kMailAppleMailCreator        = 'apml';                        {  message and letter block creator  }
  135.     kMailLtrMsgType                = 'lttr';                        {  message type of letters, reports  }
  136.     kMailLtrHdrType                = 'lthd';                        {  contains letter header  }
  137.     kMailContentType            = 'body';                        {  contains content of letter  }
  138.     kMailEnclosureListType        = 'elst';                        {  contains list of enclosures  }
  139.     kMailEnclosureDesktopType    = 'edsk';                        {  contains desktop mgr info for enclosures  }
  140.     kMailEnclosureFileType        = 'asgl';                        {  contains a file enclosure, format is defined by AppleSingle  }
  141.     kMailImageBodyType            = 'imag';                        {  contains image of letter  }
  142.     kMailMSAMType                = 'gwyi';                        {  contains msam specific information  }
  143.     kMailTunnelLtrType            = 'tunl';                        {  used to read a tunnelled message  }
  144.     kMailHopInfoType            = 'hopi';                        {  used to read hopInfo for a tunnelled message  }
  145.     kMailReportType                = 'rpti';                        {  contains report info  }
  146.     kMailFamily                    = 'mail';                        {  Defines family of "mail" msgs: content, header, etc  }
  147.     kMailFamilyFile                = 'file';                        {  Defines family of "direct display" msgs  }
  148.  
  149. {
  150. kMailImageBodyType:
  151.     format is struct TPfPgDir - in Printing.h
  152.     *    struct TPfPgDir (
  153.     *        short    pageCount;        - number of pages in the image.
  154.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  155.     *                                - to image of page n.
  156.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  157.  
  158. kMailReportType:
  159. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  160. This block has a header, IPMReportBlockHeader,
  161. followed by an array of elements, each of type IPMRecipientReport
  162.  
  163. Various families used by mail or related msgs
  164. }
  165. { ************************************************************************************ }
  166.  
  167. TYPE
  168.     MailAttributeID                        = INTEGER;
  169. {  Values of MailAttributeID  }
  170. {  Message store attributes - stored in the catalog  }
  171. {  Will always be present in a letter and have fixed sizes  }
  172.  
  173. CONST
  174.     kMailLetterFlagsBit            = 1;                            {  MailLetterFlags  }
  175.                                                                 {  Letter attributes - stored in the letter will always be present in a letter and have fixed sizes  }
  176.     kMailIndicationsBit            = 3;                            {  MailIndications  }
  177.     kMailMsgTypeBit                = 4;                            {  OCECreatorType  }
  178.     kMailLetterIDBit            = 5;                            {  MailLetterID  }
  179.     kMailSendTimeStampBit        = 6;                            {  MailTime  }
  180.     kMailNestingLevelBit        = 7;                            {  MailNestingLevel  }
  181.     kMailMsgFamilyBit            = 8;                            {  OSType  }
  182.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have fixed sizes  }
  183.     kMailReplyIDBit                = 9;                            {  MailLetterID  }
  184.     kMailConversationIDBit        = 10;                            {  MailLetterID  }
  185.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have variable length sizes  }
  186.     kMailSubjectBit                = 11;                            {  RString  }
  187.     kMailFromBit                = 12;                            {  MailRecipient  }
  188.     kMailToBit                    = 13;                            {  MailRecipient  }
  189.     kMailCcBit                    = 14;                            {  MailRecipient  }
  190.     kMailBccBit                    = 15;                            {  MailRecipient  }
  191.  
  192.  
  193. TYPE
  194.     MailAttributeMask                    = LONGINT;
  195. {  Values of MailAttributeMask  }
  196.  
  197. CONST
  198.     kMailLetterFlagsMask        = $00000001;
  199.     kMailIndicationsMask        = $00000004;
  200.     kMailMsgTypeMask            = $00000008;
  201.     kMailLetterIDMask            = $00000010;
  202.     kMailSendTimeStampMask        = $00000020;
  203.     kMailNestingLevelMask        = $00000040;
  204.     kMailMsgFamilyMask            = $00000080;
  205.     kMailReplyIDMask            = $00000100;
  206.     kMailConversationIDMask        = $00000200;
  207.     kMailSubjectMask            = $00000400;
  208.     kMailFromMask                = $00000800;
  209.     kMailToMask                    = $00001000;
  210.     kMailCcMask                    = $00002000;
  211.     kMailBccMask                = $00004000;
  212.  
  213.  
  214. TYPE
  215.     MailAttributeBitmap                    = LONGINT;
  216. { ************************************************************************************ }
  217.     MailLetterSystemFlags                = INTEGER;
  218. {  Values of MailLetterSystemFlags  }
  219. {  letter is available locally (either by nature or via cache)  }
  220.  
  221. CONST
  222.     kMailIsLocalBit                = 2;
  223.  
  224.     kMailIsLocalMask            = $00000004;
  225.  
  226.  
  227. TYPE
  228.     MailLetterUserFlags                    = INTEGER;
  229.  
  230. CONST
  231.     kMailReadBit                = 0;                            {  this letter has been opened  }
  232.     kMailDontArchiveBit            = 1;                            {  this letter is not to be archived either because it has already been archived or it should not be archived.  }
  233.     kMailInTrashBit                = 2;                            {  this letter is in trash  }
  234.  
  235. {  Values of MailLetterUserFlags  }
  236.     kMailReadMask                = $00000001;
  237.     kMailDontArchiveMask        = $00000002;
  238.     kMailInTrashMask            = $00000004;
  239.  
  240.  
  241. TYPE
  242.     MailLetterFlagsPtr = ^MailLetterFlags;
  243.     MailLetterFlags = RECORD
  244.         sysFlags:                MailLetterSystemFlags;
  245.         userFlags:                MailLetterUserFlags;
  246.     END;
  247.  
  248.     MailMaskedLetterFlagsPtr = ^MailMaskedLetterFlags;
  249.     MailMaskedLetterFlags = RECORD
  250.         flagMask:                MailLetterFlags;                        {  flags that are to be set  }
  251.         flagValues:                MailLetterFlags;                        {  and their values  }
  252.     END;
  253.  
  254.  
  255. CONST
  256.     kMailOriginalInReportBit    = 1;
  257.     kMailNonReceiptReportsBit    = 3;
  258.     kMailReceiptReportsBit        = 4;
  259.     kMailForwardedBit            = 5;
  260.     kMailPriorityBit            = 6;
  261.     kMailIsReportWithOriginalBit = 8;
  262.     kMailIsReportBit            = 9;
  263.     kMailHasContentBit            = 10;
  264.     kMailHasSignatureBit        = 11;
  265.     kMailAuthenticatedBit        = 12;
  266.     kMailSentBit                = 13;
  267.     kMailNativeContentBit        = 14;
  268.     kMailImageContentBit        = 15;
  269.     kMailStandardContentBit        = 16;
  270.  
  271. {  Values of MailIndications  }
  272.     kMailStandardContentMask    = $00008000;
  273.     kMailImageContentMask        = $00004000;
  274.     kMailNativeContentMask        = $00002000;
  275.     kMailSentMask                = $00001000;
  276.     kMailAuthenticatedMask        = $00000800;
  277.     kMailHasSignatureMask        = $00000400;
  278.     kMailHasContentMask            = $00000200;
  279.     kMailIsReportMask            = $00000100;
  280.     kMailIsReportWithOriginalMask = $00000080;
  281.     kMailPriorityMask            = $00000060;
  282.     kMailForwardedMask            = $00000010;
  283.     kMailReceiptReportsMask        = $00000008;
  284.     kMailNonReceiptReportsMask    = $00000004;
  285.     kMailOriginalInReportMask    = $00000003;
  286.  
  287.  
  288. TYPE
  289.     MailIndications                        = LONGINT;
  290. {  values of the field originalInReport in MailIndications  }
  291.  
  292. CONST
  293.     kMailNoOriginal                = 0;                            {  do not enclose original in reports  }
  294.     kMailEncloseOnNonReceipt    = 3;                            {  enclose original in non-delivery reports  }
  295.  
  296.  
  297. TYPE
  298.     MailLetterID                        = IPMMsgID;
  299.     MailLetterIDPtr                     = ^MailLetterID;
  300.     MailTimePtr = ^MailTime;
  301.     MailTime = RECORD
  302.         time:                    UTCTime;                                {  current UTC(GMT) time  }
  303.         offset:                    UTCOffset;                                {  offset from GMT  }
  304.     END;
  305.  
  306. {  innermost letter has nestingLevel 0  }
  307.     MailNestingLevel                    = INTEGER;
  308.     MailRecipient                        = OCERecipient;
  309.     MailRecipientPtr                     = ^MailRecipient;
  310. { ************************************************************************************ }
  311.  
  312. CONST
  313.     kMailTextSegmentBit            = 0;
  314.     kMailPictSegmentBit            = 1;
  315.     kMailSoundSegmentBit        = 2;
  316.     kMailStyledTextSegmentBit    = 3;
  317.     kMailMovieSegmentBit        = 4;
  318.  
  319.  
  320. TYPE
  321.     MailSegmentMask                        = INTEGER;
  322. {  Values of MailSegmentMask  }
  323.  
  324. CONST
  325.     kMailTextSegmentMask        = $00000001;
  326.     kMailPictSegmentMask        = $00000002;
  327.     kMailSoundSegmentMask        = $00000004;
  328.     kMailStyledTextSegmentMask    = $00000008;
  329.     kMailMovieSegmentMask        = $00000010;
  330.  
  331.  
  332. TYPE
  333.     MailSegmentType                        = INTEGER;
  334. {  Values of MailSegmentType  }
  335.  
  336. CONST
  337.     kMailInvalidSegmentType        = 0;
  338.     kMailTextSegmentType        = 1;
  339.     kMailPictSegmentType        = 2;
  340.     kMailSoundSegmentType        = 3;
  341.     kMailStyledTextSegmentType    = 4;
  342.     kMailMovieSegmentType        = 5;
  343.  
  344. { ************************************************************************************ }
  345.     kMailErrorLogEntryVersion    = $0101;
  346.     kMailMSAMErrorStringListID    = 128;                            {  These 'STR#' resources should be  }
  347.     kMailMSAMActionStringListID    = 129;                            {  in the PMSAM resource fork  }
  348.  
  349.  
  350. TYPE
  351.     MailLogErrorType                    = INTEGER;
  352. {  Values of MailLogErrorType  }
  353.  
  354. CONST
  355.     kMailELECorrectable            = 0;
  356.     kMailELEError                = 1;
  357.     kMailELEWarning                = 2;
  358.     kMailELEInformational        = 3;
  359.  
  360.  
  361. TYPE
  362.     MailLogErrorCode                    = INTEGER;
  363. {  Values of MailLogErrorCode  }
  364.  
  365. CONST
  366.     kMailMSAMErrorCode            = 0;                            {  positive codes are indices into PMSAM defined strings  }
  367.     kMailMiscError                = -1;                            {  negative codes are OCE defined  }
  368.     kMailNoModem                = -2;                            {  modem required, but missing  }
  369.  
  370.  
  371. TYPE
  372.     MailErrorLogEntryInfoPtr = ^MailErrorLogEntryInfo;
  373.     MailErrorLogEntryInfo = RECORD
  374.         version:                INTEGER;
  375.         timeOccurred:            UTCTime;                                {  do not fill in  }
  376.         reportingPMSAM:            Str31;                                    {  do not fill in  }
  377.         reportingMSAMSlot:        Str31;                                    {  do not fill in  }
  378.         errorType:                MailLogErrorType;
  379.         errorCode:                MailLogErrorCode;
  380.         errorResource:            INTEGER;                                {  resources are valid if  }
  381.         actionResource:            INTEGER;                                {  errorCode = kMailMSAMErrorCode index starts from 1  }
  382.         filler:                    LONGINT;
  383.         filler2:                INTEGER;
  384.     END;
  385.  
  386. { ************************************************************************************ }
  387.     MailBlockMode                        = INTEGER;
  388. {  Values of MailBlockMode  }
  389.  
  390. CONST
  391.     kMailFromStart                = 1;                            {  write data from offset calculated from  }
  392.     kMailFromLEOB                = 2;                            {  start of block, end of block,  }
  393.     kMailFromMark                = 3;                            {  or from the current mark  }
  394.  
  395.  
  396. TYPE
  397.     MailEnclosureInfoPtr = ^MailEnclosureInfo;
  398.     MailEnclosureInfo = RECORD
  399.         enclosureName:            StringPtr;
  400.         catInfo:                CInfoPBPtr;
  401.         comment:                StringPtr;
  402.         icon:                    Ptr;
  403.     END;
  404.  
  405. { ************************************************************************************ }
  406.  
  407. CONST
  408.     kOCESetupLocationNone        = 0;                            {  disconnect state  }
  409.     kOCESetupLocationMax        = 8;                            {  maximum location value  }
  410.  
  411.  
  412. TYPE
  413.     OCESetupLocation                    = CHAR;
  414. {
  415.  location state is a bitmask, 0x1=>1st location active, 
  416.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  417. }
  418.     MailLocationFlags                    = UInt8;
  419.     MailLocationInfoPtr = ^MailLocationInfo;
  420.     MailLocationInfo = RECORD
  421.         location:                SInt8;
  422.         active:                    SInt8;
  423.     END;
  424.  
  425. { ************************************************************************************ }
  426. {  Definitions for Personal MSAMs  }
  427. { ************************************************************************************ }
  428.  
  429. CONST
  430.     kMailEPPCMsgVersion            = 3;
  431.  
  432.  
  433. TYPE
  434.     MailEPPCMsgPtr = ^MailEPPCMsg;
  435.     MailEPPCMsg = RECORD
  436.         version:                INTEGER;
  437.         CASE INTEGER OF
  438.         0: (
  439.             theSMCA:            SMCAPtr;                                {  for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn'  }
  440.             );
  441.         1: (
  442.             sequenceNumber:        LONGINT;                                {  for 'inqu', 'dlom'  }
  443.             );
  444.         2: (
  445.             locationInfo:        MailLocationInfo;                        {  for 'locc'  }
  446.             );
  447.     END;
  448.  
  449. {  Values of OCE defined High Level Event message classes  }
  450.  
  451. CONST
  452.     kMailEPPCCreateSlot            = 'crsl';
  453.     kMailEPPCModifySlot            = 'mdsl';
  454.     kMailEPPCDeleteSlot            = 'dlsl';
  455.     kMailEPPCShutDown            = 'quit';
  456.     kMailEPPCMailboxOpened        = 'mbop';
  457.     kMailEPPCMailboxClosed        = 'mbcl';
  458.     kMailEPPCMsgPending            = 'msgp';
  459.     kMailEPPCSendImmediate        = 'sndi';
  460.     kMailEPPCContinue            = 'cont';
  461.     kMailEPPCSchedule            = 'sked';
  462.     kMailEPPCAdmin                = 'admn';
  463.     kMailEPPCInQUpdate            = 'inqu';
  464.     kMailEPPCMsgOpened            = 'msgo';
  465.     kMailEPPCDeleteOutQMsg        = 'dlom';
  466.     kMailEPPCWakeup                = 'wkup';
  467.     kMailEPPCLocationChanged    = 'locc';
  468.  
  469.  
  470. TYPE
  471.     MailTimerPtr = ^MailTimer;
  472.     MailTimer = RECORD
  473.         CASE INTEGER OF
  474.         0: (
  475.             frequency:            LONGINT;                                {  how often to connect  }
  476.             );
  477.         1: (
  478.             connectTime:        LONGINT;                                {  time since midnight  }
  479.             );
  480.     END;
  481.  
  482.  
  483. CONST
  484.     kMailTimerOff                = 0;                            {  control is off  }
  485.     kMailTimerTime                = 1;                            {  specifies connect time (relative to midnight)  }
  486.     kMailTimerFrequency            = 2;                            {  specifies connect frequency  }
  487.  
  488.  
  489. TYPE
  490.     MailTimerKind                        = Byte;
  491.     MailTimersPtr = ^MailTimers;
  492.     MailTimers = RECORD
  493.         sendTimeKind:            SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  494.         receiveTimeKind:        SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  495.         send:                    MailTimer;
  496.         receive:                MailTimer;
  497.     END;
  498.  
  499.     MailStandardSlotInfoAttributePtr = ^MailStandardSlotInfoAttribute;
  500.     MailStandardSlotInfoAttribute = RECORD
  501.         version:                INTEGER;
  502.         active:                    SInt8;                                    {  active if MailLocationMask(i) is set  }
  503.         padByte:                SInt8;
  504.         sendReceiveTimer:        MailTimers;
  505.     END;
  506.  
  507.     MSAMIOCompletionProcPtr = Register68kProcPtr;  { PROCEDURE MSAMIOCompletion(VAR paramBlock: MSAMParam); }
  508.  
  509.     MSAMIOCompletionUPP = UniversalProcPtr;
  510.     PMSAMGetMSAMRecordPBPtr = ^PMSAMGetMSAMRecordPB;
  511.     PMSAMGetMSAMRecordPB = RECORD
  512.         qLink:                    Ptr;
  513.         reservedH1:                LONGINT;
  514.         reservedH2:                LONGINT;
  515.         ioCompletion:            MSAMIOCompletionUPP;
  516.         ioResult:                OSErr;
  517.         saveA5:                    LONGINT;
  518.         reqCode:                INTEGER;
  519.         msamCID:                CreationID;
  520.     END;
  521.  
  522.     PMSAMOpenQueuesPBPtr = ^PMSAMOpenQueuesPB;
  523.     PMSAMOpenQueuesPB = RECORD
  524.         qLink:                    Ptr;
  525.         reservedH1:                LONGINT;
  526.         reservedH2:                LONGINT;
  527.         ioCompletion:            MSAMIOCompletionUPP;
  528.         ioResult:                OSErr;
  529.         saveA5:                    LONGINT;
  530.         reqCode:                INTEGER;
  531.         inQueueRef:                MSAMQueueRef;
  532.         outQueueRef:            MSAMQueueRef;
  533.         msamSlotID:                MSAMSlotID;
  534.         filler:                    ARRAY [0..1] OF LONGINT;
  535.     END;
  536.  
  537.     PMSAMStatus                            = INTEGER;
  538. {  Values of PMSAMStatus  }
  539.  
  540. CONST
  541.     kPMSAMStatusPending            = 1;                            {  for inQueue and outQueue  }
  542.     kPMSAMStatusError            = 2;                            {  for inQueue and outQueue  }
  543.     kPMSAMStatusSending            = 3;                            {  for outQueue only  }
  544.     kPMSAMStatusCaching            = 4;                            {  for inQueue only  }
  545.     kPMSAMStatusSent            = 5;                            {  for outQueue only  }
  546.  
  547.  
  548. TYPE
  549.     PMSAMSetStatusPBPtr = ^PMSAMSetStatusPB;
  550.     PMSAMSetStatusPB = RECORD
  551.         qLink:                    Ptr;
  552.         reservedH1:                LONGINT;
  553.         reservedH2:                LONGINT;
  554.         ioCompletion:            MSAMIOCompletionUPP;
  555.         ioResult:                OSErr;
  556.         saveA5:                    LONGINT;
  557.         reqCode:                INTEGER;
  558.         queueRef:                MSAMQueueRef;
  559.         seqNum:                    LONGINT;
  560.         msgHint:                LONGINT;                                {  for posting cache error,set this to 0 when report outq status  }
  561.         status:                    PMSAMStatus;
  562.     END;
  563.  
  564.     PMSAMLogErrorPBPtr = ^PMSAMLogErrorPB;
  565.     PMSAMLogErrorPB = RECORD
  566.         qLink:                    Ptr;
  567.         reservedH1:                LONGINT;
  568.         reservedH2:                LONGINT;
  569.         ioCompletion:            MSAMIOCompletionUPP;
  570.         ioResult:                OSErr;
  571.         saveA5:                    LONGINT;
  572.         reqCode:                INTEGER;
  573.         msamSlotID:                MSAMSlotID;                                {  0 for PMSAM errors  }
  574.         logEntry:                MailErrorLogEntryInfoPtr;
  575.         filler:                    ARRAY [0..1] OF LONGINT;
  576.     END;
  577.  
  578. { ************************************************************************************** }
  579.  
  580. CONST
  581.     kMailMsgSummaryVersion        = 1;
  582.  
  583.  
  584. TYPE
  585.     MailMasterDataPtr = ^MailMasterData;
  586.     MailMasterData = RECORD
  587.         attrMask:                MailAttributeBitmap;                    {  indicates attributes present in MsgSummary  }
  588.         messageID:                MailLetterID;
  589.         replyID:                MailLetterID;
  590.         conversationID:            MailLetterID;
  591.     END;
  592.  
  593. {  Values for addressedToMe in struct MailCoreData  }
  594.  
  595. CONST
  596.     kAddressedAs_TO                = $01;
  597.     kAddressedAs_CC                = $02;
  598.     kAddressedAs_BCC            = $04;
  599.  
  600.  
  601. TYPE
  602.     MailCoreDataPtr = ^MailCoreData;
  603.     MailCoreData = RECORD
  604.         letterFlags:            MailLetterFlags;
  605.         messageSize:            LONGINT;
  606.         letterIndications:        MailIndications;
  607.         messageType:            OCECreatorType;
  608.         sendTime:                MailTime;
  609.         messageFamily:            OSType;
  610.         reserved:                SInt8;
  611.         addressedToMe:            SInt8;
  612.         agentInfo:                PACKED ARRAY [0..5] OF CHAR;            {  6 bytes of special info [set to zero]  }
  613.                                                                         {  these are variable length and even padded  }
  614.         sender:                    RString32;                                {  recipient's entityName (trunc) }
  615.         subject:                RString32;                                {  subject maybe truncated  }
  616.     END;
  617.  
  618.     MSAMMsgSummaryPtr = ^MSAMMsgSummary;
  619.     MSAMMsgSummary = RECORD
  620.         version:                INTEGER;                                {  following flags are defaulted by Toolbox  }
  621.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  622.         msgUpdated:                BOOLEAN;                                {  true if msgSummary was updated by MailManager  }
  623.         msgCached:                BOOLEAN;                                {  true if msg is in the slot's InQueue  }
  624.         padByte:                SInt8;
  625.         masterData:                MailMasterData;
  626.         coreData:                MailCoreData;
  627.     END;
  628.  
  629. {  PMSAM can put up to 128 bytes of private msg summary data  }
  630.  
  631. CONST
  632.     kMailMaxPMSAMMsgSummaryData    = 128;
  633.  
  634.  
  635. TYPE
  636.     PMSAMCreateMsgSummaryPBPtr = ^PMSAMCreateMsgSummaryPB;
  637.     PMSAMCreateMsgSummaryPB = RECORD
  638.         qLink:                    Ptr;
  639.         reservedH1:                LONGINT;
  640.         reservedH2:                LONGINT;
  641.         ioCompletion:            MSAMIOCompletionUPP;
  642.         ioResult:                OSErr;
  643.         saveA5:                    LONGINT;
  644.         reqCode:                INTEGER;
  645.         inQueueRef:                MSAMQueueRef;
  646.         seqNum:                    LONGINT;                                {  <- seq of the new message  }
  647.         msgSummary:                MSAMMsgSummaryPtr;                        {  attributes and mask filled in  }
  648.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be appended  }
  649.     END;
  650.  
  651.     PMSAMPutMsgSummaryPBPtr = ^PMSAMPutMsgSummaryPB;
  652.     PMSAMPutMsgSummaryPB = RECORD
  653.         qLink:                    Ptr;
  654.         reservedH1:                LONGINT;
  655.         reservedH2:                LONGINT;
  656.         ioCompletion:            MSAMIOCompletionUPP;
  657.         ioResult:                OSErr;
  658.         saveA5:                    LONGINT;
  659.         reqCode:                INTEGER;
  660.         inQueueRef:                MSAMQueueRef;
  661.         seqNum:                    LONGINT;
  662.         letterFlags:            MailMaskedLetterFlagsPtr;                {  if not nil, then set msgStoreFlags  }
  663.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be overwritten  }
  664.     END;
  665.  
  666.     PMSAMGetMsgSummaryPBPtr = ^PMSAMGetMsgSummaryPB;
  667.     PMSAMGetMsgSummaryPB = RECORD
  668.         qLink:                    Ptr;
  669.         reservedH1:                LONGINT;
  670.         reservedH2:                LONGINT;
  671.         ioCompletion:            MSAMIOCompletionUPP;
  672.         ioResult:                OSErr;
  673.         saveA5:                    LONGINT;
  674.         reqCode:                INTEGER;
  675.         inQueueRef:                MSAMQueueRef;
  676.         seqNum:                    LONGINT;
  677.         msgSummary:                MSAMMsgSummaryPtr;                        {  if not nil, then read in the msgSummary  }
  678.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be read  }
  679.         msgSummaryOffset:        INTEGER;                                {  offset of PMSAM specific data from start of MsgSummary  }
  680.     END;
  681.  
  682. { ************************************************************************************** }
  683. {  Definitions for Server MSAMs  }
  684. { ************************************************************************************ }
  685.     SMSAMAdminCode                        = INTEGER;
  686. {  Values of SMSAMAdminCode  }
  687.  
  688. CONST
  689.     kSMSAMNotifyFwdrSetupChange    = 1;
  690.     kSMSAMNotifyFwdrNameChange    = 2;
  691.     kSMSAMNotifyFwdrPwdChange    = 3;
  692.     kSMSAMGetDynamicFwdrParams    = 4;
  693.  
  694.  
  695. TYPE
  696.     SMSAMSlotChanges                    = LONGINT;
  697.  
  698. CONST
  699.     kSMSAMFwdrHomeInternetChangedBit = 0;
  700.     kSMSAMFwdrConnectedToChangedBit = 1;
  701.     kSMSAMFwdrForeignRLIsChangedBit = 2;
  702.     kSMSAMFwdrMnMServerChangedBit = 3;
  703.  
  704. {  Values of SMSAMSlotChanges  }
  705.     kSMSAMFwdrEverythingChangedMask = -1;
  706.     kSMSAMFwdrHomeInternetChangedMask = $00000001;
  707.     kSMSAMFwdrConnectedToChangedMask = $00000002;
  708.     kSMSAMFwdrForeignRLIsChangedMask = $00000004;
  709.     kSMSAMFwdrMnMServerChangedMask = $00000008;
  710.  
  711. {  kSMSAMNotifyFwdrSetupChange  }
  712.  
  713. TYPE
  714.     SMSAMSetupChangePtr = ^SMSAMSetupChange;
  715.     SMSAMSetupChange = RECORD
  716.         whatChanged:            SMSAMSlotChanges;                        {   --> bitmap of what parameters changed  }
  717.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  718.     END;
  719.  
  720. {  kSMSAMNotifyFwdrNameChange  }
  721.     SMSAMNameChangePtr = ^SMSAMNameChange;
  722.     SMSAMNameChange = RECORD
  723.         newName:                RString;                                {   --> msams new name  }
  724.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  725.     END;
  726.  
  727. {  kSMSAMNotifyFwdrPasswordChange  }
  728.     SMSAMPasswordChangePtr = ^SMSAMPasswordChange;
  729.     SMSAMPasswordChange = RECORD
  730.         newPassword:            RString;                                {   --> msams new password  }
  731.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  732.     END;
  733.  
  734. {  kSMSAMGetDynamicFwdrParams  }
  735.     SMSAMDynamicParamsPtr = ^SMSAMDynamicParams;
  736.     SMSAMDynamicParams = RECORD
  737.         curDiskUsed:            LONGINT;                                {  <--  amount of disk space used by msam  }
  738.         curMemoryUsed:            LONGINT;                                {  <--  amount of memory used by msam  }
  739.     END;
  740.  
  741.     SMSAMAdminEPPCRequestPtr = ^SMSAMAdminEPPCRequest;
  742.     SMSAMAdminEPPCRequest = RECORD
  743.         adminCode:                SMSAMAdminCode;
  744.         CASE INTEGER OF
  745.         0: (
  746.             setupChange:        SMSAMSetupChange;
  747.             );
  748.         1: (
  749.             nameChange:            SMSAMNameChange;
  750.             );
  751.         2: (
  752.             passwordChange:        SMSAMPasswordChange;
  753.             );
  754.         3: (
  755.             dynamicParams:        SMSAMDynamicParams;
  756.             );
  757.     END;
  758.  
  759.     SMSAMSetupPBPtr = ^SMSAMSetupPB;
  760.     SMSAMSetupPB = RECORD
  761.         qLink:                    Ptr;
  762.         reservedH1:                LONGINT;
  763.         reservedH2:                LONGINT;
  764.         ioCompletion:            MSAMIOCompletionUPP;
  765.         ioResult:                OSErr;
  766.         saveA5:                    LONGINT;
  767.         reqCode:                INTEGER;
  768.         serverMSAM:                RecordIDPtr;
  769.         password:                RStringPtr;
  770.         gatewayType:            OSType;
  771.         gatewayTypeDescription:    RStringPtr;
  772.         catalogServerHint:        AddrBlock;
  773.     END;
  774.  
  775.     SMSAMStartupPBPtr = ^SMSAMStartupPB;
  776.     SMSAMStartupPB = RECORD
  777.         qLink:                    Ptr;
  778.         reservedH1:                LONGINT;
  779.         reservedH2:                LONGINT;
  780.         ioCompletion:            MSAMIOCompletionUPP;
  781.         ioResult:                OSErr;
  782.         saveA5:                    LONGINT;
  783.         reqCode:                INTEGER;
  784.         msamIdentity:            AuthIdentity;
  785.         queueRef:                MSAMQueueRef;
  786.     END;
  787.  
  788.     SMSAMShutdownPBPtr = ^SMSAMShutdownPB;
  789.     SMSAMShutdownPB = RECORD
  790.         qLink:                    Ptr;
  791.         reservedH1:                LONGINT;
  792.         reservedH2:                LONGINT;
  793.         ioCompletion:            MSAMIOCompletionUPP;
  794.         ioResult:                OSErr;
  795.         saveA5:                    LONGINT;
  796.         reqCode:                INTEGER;
  797.         queueRef:                MSAMQueueRef;
  798.     END;
  799.  
  800. { ************************************************************************************** }
  801. {  Definitions for reading and writing MSAM Letters  }
  802. { ************************************************************************************** }
  803.     MSAMEnumeratePBPtr = ^MSAMEnumeratePB;
  804.     MSAMEnumeratePB = RECORD
  805.         qLink:                    Ptr;
  806.         reservedH1:                LONGINT;
  807.         reservedH2:                LONGINT;
  808.         ioCompletion:            MSAMIOCompletionUPP;
  809.         ioResult:                OSErr;
  810.         saveA5:                    LONGINT;
  811.         reqCode:                INTEGER;
  812.         queueRef:                MSAMQueueRef;
  813.         startSeqNum:            LONGINT;
  814.         nextSeqNum:                LONGINT;
  815.                                                                         {  buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue  }
  816.         buffer:                    MailBuffer;
  817.     END;
  818.  
  819.     MSAMEnumerateInQReplyPtr = ^MSAMEnumerateInQReply;
  820.     MSAMEnumerateInQReply = RECORD
  821.         seqNum:                    LONGINT;
  822.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  823.         msgUpdated:                BOOLEAN;                                {  true if MsgSummary has been updated by TB  }
  824.         msgCached:                BOOLEAN;                                {  true if msg is in the incoming queue  }
  825.         padByte:                SInt8;
  826.     END;
  827.  
  828.     MSAMEnumerateOutQReplyPtr = ^MSAMEnumerateOutQReply;
  829.     MSAMEnumerateOutQReply = RECORD
  830.         seqNum:                    LONGINT;
  831.         done:                    BOOLEAN;                                {  true if all responsible recipients have been processed  }
  832.         priority:                SInt8;
  833.         msgFamily:                OSType;
  834.         approxSize:                LONGINT;
  835.         tunnelForm:                BOOLEAN;                                {  true if this letter has to be tunnelled  }
  836.         padByte:                SInt8;
  837.         nextHop:                NetworkSpec;                            {  valid if tunnelForm is true  }
  838.         msgType:                OCECreatorType;
  839.     END;
  840.  
  841.     MSAMDeletePBPtr = ^MSAMDeletePB;
  842.     MSAMDeletePB = RECORD
  843.         qLink:                    Ptr;
  844.         reservedH1:                LONGINT;
  845.         reservedH2:                LONGINT;
  846.         ioCompletion:            MSAMIOCompletionUPP;
  847.         ioResult:                OSErr;
  848.         saveA5:                    LONGINT;
  849.         reqCode:                INTEGER;
  850.         queueRef:                MSAMQueueRef;
  851.         seqNum:                    LONGINT;
  852.         msgOnly:                BOOLEAN;                                {  only valid for PMSAM & inQueue  }
  853.                                                                         {  set true to delete message but not msgSummary  }
  854.         padByte:                SInt8;
  855.                                                                         {  only valid for SMSAM & tunnelled messages  }
  856.         result:                    OSErr;
  857.     END;
  858.  
  859.     MSAMOpenPBPtr = ^MSAMOpenPB;
  860.     MSAMOpenPB = RECORD
  861.         qLink:                    Ptr;
  862.         reservedH1:                LONGINT;
  863.         reservedH2:                LONGINT;
  864.         ioCompletion:            MSAMIOCompletionUPP;
  865.         ioResult:                OSErr;
  866.         saveA5:                    LONGINT;
  867.         reqCode:                INTEGER;
  868.         queueRef:                MSAMQueueRef;
  869.         seqNum:                    LONGINT;
  870.         mailMsgRef:                MailMsgRef;
  871.     END;
  872.  
  873.     MSAMOpenNestedPBPtr = ^MSAMOpenNestedPB;
  874.     MSAMOpenNestedPB = RECORD
  875.         qLink:                    Ptr;
  876.         reservedH1:                LONGINT;
  877.         reservedH2:                LONGINT;
  878.         ioCompletion:            MSAMIOCompletionUPP;
  879.         ioResult:                OSErr;
  880.         saveA5:                    LONGINT;
  881.         reqCode:                INTEGER;
  882.         mailMsgRef:                MailMsgRef;
  883.         nestedRef:                MailMsgRef;
  884.     END;
  885.  
  886.     MSAMClosePBPtr = ^MSAMClosePB;
  887.     MSAMClosePB = RECORD
  888.         qLink:                    Ptr;
  889.         reservedH1:                LONGINT;
  890.         reservedH2:                LONGINT;
  891.         ioCompletion:            MSAMIOCompletionUPP;
  892.         ioResult:                OSErr;
  893.         saveA5:                    LONGINT;
  894.         reqCode:                INTEGER;
  895.         mailMsgRef:                MailMsgRef;
  896.     END;
  897.  
  898.     MSAMGetMsgHeaderPBPtr = ^MSAMGetMsgHeaderPB;
  899.     MSAMGetMsgHeaderPB = RECORD
  900.         qLink:                    Ptr;
  901.         reservedH1:                LONGINT;
  902.         reservedH2:                LONGINT;
  903.         ioCompletion:            MSAMIOCompletionUPP;
  904.         ioResult:                OSErr;
  905.         saveA5:                    LONGINT;
  906.         reqCode:                INTEGER;
  907.         mailMsgRef:                MailMsgRef;
  908.         selector:                SInt8;
  909.         filler1:                BOOLEAN;
  910.         offset:                    LONGINT;
  911.         buffer:                    MailBuffer;
  912.         remaining:                LONGINT;
  913.     END;
  914.  
  915. {
  916.     MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  917.     the attributes indicated in responseMask, 
  918.     from the attribute indicated by the least significant bit set
  919.     to the attribute indicated by the most significant bit set.
  920.     Note that recipients - from, to, cc, bcc cannot be read using
  921.     this call. Use GetRecipients to read these. 
  922. }
  923.     MSAMGetAttributesPBPtr = ^MSAMGetAttributesPB;
  924.     MSAMGetAttributesPB = RECORD
  925.         qLink:                    Ptr;
  926.         reservedH1:                LONGINT;
  927.         reservedH2:                LONGINT;
  928.         ioCompletion:            MSAMIOCompletionUPP;
  929.         ioResult:                OSErr;
  930.         saveA5:                    LONGINT;
  931.         reqCode:                INTEGER;
  932.         mailMsgRef:                MailMsgRef;
  933.         requestMask:            MailAttributeBitmap;                    {  kMailIndicationsBit thru kMailSubjectBit  }
  934.         buffer:                    MailBuffer;
  935.         responseMask:            MailAttributeBitmap;
  936.         more:                    BOOLEAN;
  937.         filler1:                BOOLEAN;
  938.     END;
  939.  
  940. {  attrID value to get resolved recipient list  }
  941.  
  942. CONST
  943.     kMailResolvedList            = 0;
  944.  
  945.  
  946. TYPE
  947.     MailOriginalRecipientPtr = ^MailOriginalRecipient;
  948.     MailOriginalRecipient = RECORD
  949.         index:                    INTEGER;
  950.     END;
  951.  
  952. {  Followed by OCEPackedRecipient  }
  953.     MailResolvedRecipientPtr = ^MailResolvedRecipient;
  954.     MailResolvedRecipient = RECORD
  955.         index:                    INTEGER;
  956.         recipientFlags:            INTEGER;
  957.         responsible:            BOOLEAN;
  958.         padByte:                SInt8;
  959.     END;
  960.  
  961. {  Followed by OCEPackedRecipient  }
  962. {
  963.      MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  964.     MailOriginalRecipient if getting original recipients 
  965.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  966.     MailResolvedRecipient if getting resolved reicpients
  967.                             ie the attrID is kMailResolvedList
  968.     Both tuples are word alligned.  
  969. }
  970.     MSAMGetRecipientsPBPtr = ^MSAMGetRecipientsPB;
  971.     MSAMGetRecipientsPB = RECORD
  972.         qLink:                    Ptr;
  973.         reservedH1:                LONGINT;
  974.         reservedH2:                LONGINT;
  975.         ioCompletion:            MSAMIOCompletionUPP;
  976.         ioResult:                OSErr;
  977.         saveA5:                    LONGINT;
  978.         reqCode:                INTEGER;
  979.         mailMsgRef:                MailMsgRef;
  980.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  981.         startIndex:                INTEGER;                                {  starts at 1  }
  982.         buffer:                    MailBuffer;
  983.         nextIndex:                INTEGER;
  984.         more:                    BOOLEAN;
  985.         filler1:                BOOLEAN;
  986.     END;
  987.  
  988.     MSAMGetContentPBPtr = ^MSAMGetContentPB;
  989.     MSAMGetContentPB = RECORD
  990.         qLink:                    Ptr;
  991.         reservedH1:                LONGINT;
  992.         reservedH2:                LONGINT;
  993.         ioCompletion:            MSAMIOCompletionUPP;
  994.         ioResult:                OSErr;
  995.         saveA5:                    LONGINT;
  996.         reqCode:                INTEGER;
  997.         mailMsgRef:                MailMsgRef;
  998.         segmentMask:            MailSegmentMask;
  999.         buffer:                    MailBuffer;
  1000.         textScrap:                StScrpRecPtr;
  1001.         script:                    ScriptCode;
  1002.         segmentType:            MailSegmentType;
  1003.         endOfScript:            BOOLEAN;
  1004.         endOfSegment:            BOOLEAN;
  1005.         endOfContent:            BOOLEAN;
  1006.         filler1:                BOOLEAN;
  1007.         segmentLength:            LONGINT;                                {  NEW: <-  valid first call in a segment  }
  1008.         segmentID:                LONGINT;                                {  NEW: <-> identifier for this segment  }
  1009.     END;
  1010.  
  1011.     MSAMGetEnclosurePBPtr = ^MSAMGetEnclosurePB;
  1012.     MSAMGetEnclosurePB = RECORD
  1013.         qLink:                    Ptr;
  1014.         reservedH1:                LONGINT;
  1015.         reservedH2:                LONGINT;
  1016.         ioCompletion:            MSAMIOCompletionUPP;
  1017.         ioResult:                OSErr;
  1018.         saveA5:                    LONGINT;
  1019.         reqCode:                INTEGER;
  1020.         mailMsgRef:                MailMsgRef;
  1021.         contentEnclosure:        BOOLEAN;
  1022.         padByte:                SInt8;
  1023.         buffer:                    MailBuffer;
  1024.         endOfFile:                BOOLEAN;
  1025.         endOfEnclosures:        BOOLEAN;
  1026.     END;
  1027.  
  1028.     MailBlockInfoPtr = ^MailBlockInfo;
  1029.     MailBlockInfo = RECORD
  1030.         blockType:                OCECreatorType;
  1031.         offset:                    LONGINT;
  1032.         blockLength:            LONGINT;
  1033.     END;
  1034.  
  1035.     MSAMEnumerateBlocksPBPtr = ^MSAMEnumerateBlocksPB;
  1036.     MSAMEnumerateBlocksPB = RECORD
  1037.         qLink:                    Ptr;
  1038.         reservedH1:                LONGINT;
  1039.         reservedH2:                LONGINT;
  1040.         ioCompletion:            MSAMIOCompletionUPP;
  1041.         ioResult:                OSErr;
  1042.         saveA5:                    LONGINT;
  1043.         reqCode:                INTEGER;
  1044.         mailMsgRef:                MailMsgRef;
  1045.         startIndex:                INTEGER;                                {  starts at 1  }
  1046.         buffer:                    MailBuffer;
  1047.                                                                         {      buffer contains a Mail Reply. Each tuple is a MailBlockInfo  }
  1048.         nextIndex:                INTEGER;
  1049.         more:                    BOOLEAN;
  1050.         filler1:                BOOLEAN;
  1051.     END;
  1052.  
  1053.     MSAMGetBlockPBPtr = ^MSAMGetBlockPB;
  1054.     MSAMGetBlockPB = RECORD
  1055.         qLink:                    Ptr;
  1056.         reservedH1:                LONGINT;
  1057.         reservedH2:                LONGINT;
  1058.         ioCompletion:            MSAMIOCompletionUPP;
  1059.         ioResult:                OSErr;
  1060.         saveA5:                    LONGINT;
  1061.         reqCode:                INTEGER;
  1062.         mailMsgRef:                MailMsgRef;
  1063.         blockType:                OCECreatorType;
  1064.         blockIndex:                INTEGER;
  1065.         buffer:                    MailBuffer;
  1066.         dataOffset:                LONGINT;
  1067.         endOfBlock:                BOOLEAN;
  1068.         padByte:                SInt8;
  1069.         remaining:                LONGINT;
  1070.     END;
  1071.  
  1072. {
  1073.  YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1074.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1075.  * REASONS.
  1076. }
  1077. {  not valid for tunnel form letters  }
  1078.     MSAMMarkRecipientsPBPtr = ^MSAMMarkRecipientsPB;
  1079.     MSAMMarkRecipientsPB = RECORD
  1080.         qLink:                    Ptr;
  1081.         reservedH1:                LONGINT;
  1082.         reservedH2:                LONGINT;
  1083.         ioCompletion:            MSAMIOCompletionUPP;
  1084.         ioResult:                OSErr;
  1085.         saveA5:                    LONGINT;
  1086.         reqCode:                INTEGER;
  1087.         queueRef:                MSAMQueueRef;
  1088.         seqNum:                    LONGINT;
  1089.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1090.     END;
  1091.  
  1092. {
  1093.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1094.  * queueRef, seqNum 
  1095. }
  1096. {  not valid for tunnel form letters  }
  1097.     MSAMnMarkRecipientsPBPtr = ^MSAMnMarkRecipientsPB;
  1098.     MSAMnMarkRecipientsPB = RECORD
  1099.         qLink:                    Ptr;
  1100.         reservedH1:                LONGINT;
  1101.         reservedH2:                LONGINT;
  1102.         ioCompletion:            MSAMIOCompletionUPP;
  1103.         ioResult:                OSErr;
  1104.         saveA5:                    LONGINT;
  1105.         reqCode:                INTEGER;
  1106.         mailMsgRef:                MailMsgRef;
  1107.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1108.     END;
  1109.  
  1110. { ************************************************************************************** }
  1111.     MSAMCreatePBPtr = ^MSAMCreatePB;
  1112.     MSAMCreatePB = RECORD
  1113.         qLink:                    Ptr;
  1114.         reservedH1:                LONGINT;
  1115.         reservedH2:                LONGINT;
  1116.         ioCompletion:            MSAMIOCompletionUPP;
  1117.         ioResult:                OSErr;
  1118.         saveA5:                    LONGINT;
  1119.         reqCode:                INTEGER;
  1120.         queueRef:                MSAMQueueRef;
  1121.         asLetter:                BOOLEAN;                                {  indicate if we should create as letter or msg  }
  1122.         filler1:                BOOLEAN;
  1123.         msgType:                IPMMsgType;                                {  up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true  }
  1124.         refCon:                    LONGINT;                                {  for messages only  }
  1125.         seqNum:                    LONGINT;                                {  set if creating message in the inQueue  }
  1126.         tunnelForm:                BOOLEAN;                                {  if true tunnelForm else newForm  }
  1127.         bccRecipients:            BOOLEAN;                                {  true if creating letter with bcc recipients  }
  1128.         newRef:                    MailMsgRef;
  1129.     END;
  1130.  
  1131.     MSAMBeginNestedPBPtr = ^MSAMBeginNestedPB;
  1132.     MSAMBeginNestedPB = RECORD
  1133.         qLink:                    Ptr;
  1134.         reservedH1:                LONGINT;
  1135.         reservedH2:                LONGINT;
  1136.         ioCompletion:            MSAMIOCompletionUPP;
  1137.         ioResult:                OSErr;
  1138.         saveA5:                    LONGINT;
  1139.         reqCode:                INTEGER;
  1140.         mailMsgRef:                MailMsgRef;
  1141.         refCon:                    LONGINT;                                {  for messages only  }
  1142.         msgType:                IPMMsgType;
  1143.     END;
  1144.  
  1145.     MSAMEndNestedPBPtr = ^MSAMEndNestedPB;
  1146.     MSAMEndNestedPB = RECORD
  1147.         qLink:                    Ptr;
  1148.         reservedH1:                LONGINT;
  1149.         reservedH2:                LONGINT;
  1150.         ioCompletion:            MSAMIOCompletionUPP;
  1151.         ioResult:                OSErr;
  1152.         saveA5:                    LONGINT;
  1153.         reqCode:                INTEGER;
  1154.         mailMsgRef:                MailMsgRef;
  1155.     END;
  1156.  
  1157.     MSAMSubmitPBPtr = ^MSAMSubmitPB;
  1158.     MSAMSubmitPB = RECORD
  1159.         qLink:                    Ptr;
  1160.         reservedH1:                LONGINT;
  1161.         reservedH2:                LONGINT;
  1162.         ioCompletion:            MSAMIOCompletionUPP;
  1163.         ioResult:                OSErr;
  1164.         saveA5:                    LONGINT;
  1165.         reqCode:                INTEGER;
  1166.         mailMsgRef:                MailMsgRef;
  1167.         submitFlag:                BOOLEAN;
  1168.         padByte:                SInt8;
  1169.         msgID:                    MailLetterID;
  1170.     END;
  1171.  
  1172.     MSAMPutMsgHeaderPBPtr = ^MSAMPutMsgHeaderPB;
  1173.     MSAMPutMsgHeaderPB = RECORD
  1174.         qLink:                    Ptr;
  1175.         reservedH1:                LONGINT;
  1176.         reservedH2:                LONGINT;
  1177.         ioCompletion:            MSAMIOCompletionUPP;
  1178.         ioResult:                OSErr;
  1179.         saveA5:                    LONGINT;
  1180.         reqCode:                INTEGER;
  1181.         mailMsgRef:                MailMsgRef;
  1182.         replyQueue:                OCERecipientPtr;
  1183.         sender:                    IPMSenderPtr;
  1184.         deliveryNotification:    SInt8;
  1185.         priority:                SInt8;
  1186.     END;
  1187.  
  1188.     MSAMPutAttributePBPtr = ^MSAMPutAttributePB;
  1189.     MSAMPutAttributePB = RECORD
  1190.         qLink:                    Ptr;
  1191.         reservedH1:                LONGINT;
  1192.         reservedH2:                LONGINT;
  1193.         ioCompletion:            MSAMIOCompletionUPP;
  1194.         ioResult:                OSErr;
  1195.         saveA5:                    LONGINT;
  1196.         reqCode:                INTEGER;
  1197.         mailMsgRef:                MailMsgRef;
  1198.         attrID:                    MailAttributeID;                        {  kMailIndicationsBit thru kMailSubjectBit  }
  1199.         buffer:                    MailBuffer;
  1200.     END;
  1201.  
  1202.     MSAMPutRecipientPBPtr = ^MSAMPutRecipientPB;
  1203.     MSAMPutRecipientPB = RECORD
  1204.         qLink:                    Ptr;
  1205.         reservedH1:                LONGINT;
  1206.         reservedH2:                LONGINT;
  1207.         ioCompletion:            MSAMIOCompletionUPP;
  1208.         ioResult:                OSErr;
  1209.         saveA5:                    LONGINT;
  1210.         reqCode:                INTEGER;
  1211.         mailMsgRef:                MailMsgRef;
  1212.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  1213.         recipient:                MailRecipientPtr;
  1214.         responsible:            BOOLEAN;                                {  valid for server and message msams only  }
  1215.         filler1:                BOOLEAN;
  1216.     END;
  1217.  
  1218.     MSAMPutContentPBPtr = ^MSAMPutContentPB;
  1219.     MSAMPutContentPB = RECORD
  1220.         qLink:                    Ptr;
  1221.         reservedH1:                LONGINT;
  1222.         reservedH2:                LONGINT;
  1223.         ioCompletion:            MSAMIOCompletionUPP;
  1224.         ioResult:                OSErr;
  1225.         saveA5:                    LONGINT;
  1226.         reqCode:                INTEGER;
  1227.         mailMsgRef:                MailMsgRef;
  1228.         segmentType:            MailSegmentType;
  1229.         append:                    BOOLEAN;
  1230.         padByte:                SInt8;
  1231.         buffer:                    MailBuffer;
  1232.         textScrap:                StScrpRecPtr;
  1233.         startNewScript:            BOOLEAN;
  1234.         filler1:                BOOLEAN;
  1235.         script:                    ScriptCode;                                {  valid only if startNewScript is true  }
  1236.     END;
  1237.  
  1238.     MSAMPutEnclosurePBPtr = ^MSAMPutEnclosurePB;
  1239.     MSAMPutEnclosurePB = RECORD
  1240.         qLink:                    Ptr;
  1241.         reservedH1:                LONGINT;
  1242.         reservedH2:                LONGINT;
  1243.         ioCompletion:            MSAMIOCompletionUPP;
  1244.         ioResult:                OSErr;
  1245.         saveA5:                    LONGINT;
  1246.         reqCode:                INTEGER;
  1247.         mailMsgRef:                MailMsgRef;
  1248.         contentEnclosure:        BOOLEAN;
  1249.         padByte:                SInt8;
  1250.         hfs:                    BOOLEAN;                                {  true => in file system, false => in memory  }
  1251.         append:                    BOOLEAN;
  1252.         buffer:                    MailBuffer;                                {  Unused if hfs == true  }
  1253.         enclosure:                FSSpec;
  1254.         addlInfo:                MailEnclosureInfo;
  1255.     END;
  1256.  
  1257.     MSAMPutBlockPBPtr = ^MSAMPutBlockPB;
  1258.     MSAMPutBlockPB = RECORD
  1259.         qLink:                    Ptr;
  1260.         reservedH1:                LONGINT;
  1261.         reservedH2:                LONGINT;
  1262.         ioCompletion:            MSAMIOCompletionUPP;
  1263.         ioResult:                OSErr;
  1264.         saveA5:                    LONGINT;
  1265.         reqCode:                INTEGER;
  1266.         mailMsgRef:                MailMsgRef;
  1267.         refCon:                    LONGINT;                                {  for messages only  }
  1268.         blockType:                OCECreatorType;
  1269.         append:                    BOOLEAN;
  1270.         filler1:                BOOLEAN;
  1271.         buffer:                    MailBuffer;
  1272.         mode:                    MailBlockMode;                            {  if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark  }
  1273.         offset:                    LONGINT;
  1274.     END;
  1275.  
  1276. { ************************************************************************************** }
  1277.     MSAMCreateReportPBPtr = ^MSAMCreateReportPB;
  1278.     MSAMCreateReportPB = RECORD
  1279.         qLink:                    Ptr;
  1280.         reservedH1:                LONGINT;
  1281.         reservedH2:                LONGINT;
  1282.         ioCompletion:            MSAMIOCompletionUPP;
  1283.         ioResult:                OSErr;
  1284.         saveA5:                    LONGINT;
  1285.         reqCode:                INTEGER;
  1286.         queueRef:                MSAMQueueRef;                            {  to distinguish personal and server MSAMs  }
  1287.         mailMsgRef:                MailMsgRef;
  1288.         msgID:                    MailLetterID;                            {  kMailLetterIDBit of letter being reported upon  }
  1289.         sender:                    MailRecipientPtr;                        {  sender of the letter you are creating report on  }
  1290.     END;
  1291.  
  1292.     MSAMPutRecipientReportPBPtr = ^MSAMPutRecipientReportPB;
  1293.     MSAMPutRecipientReportPB = RECORD
  1294.         qLink:                    Ptr;
  1295.         reservedH1:                LONGINT;
  1296.         reservedH2:                LONGINT;
  1297.         ioCompletion:            MSAMIOCompletionUPP;
  1298.         ioResult:                OSErr;
  1299.         saveA5:                    LONGINT;
  1300.         reqCode:                INTEGER;
  1301.         mailMsgRef:                MailMsgRef;
  1302.         recipientIndex:            INTEGER;                                {  recipient index in the original letter  }
  1303.         result:                    OSErr;                                    {  result of sending the recipient  }
  1304.     END;
  1305.  
  1306. { ************************************************************************************** }
  1307.     MailWakeupPMSAMPBPtr = ^MailWakeupPMSAMPB;
  1308.     MailWakeupPMSAMPB = RECORD
  1309.         qLink:                    Ptr;
  1310.         reservedH1:                LONGINT;
  1311.         reservedH2:                LONGINT;
  1312.         ioCompletion:            MSAMIOCompletionUPP;
  1313.         ioResult:                OSErr;
  1314.         saveA5:                    LONGINT;
  1315.         reqCode:                INTEGER;
  1316.         pmsamCID:                CreationID;
  1317.         mailSlotID:                MailSlotID;
  1318.     END;
  1319.  
  1320.     MailCreateMailSlotPBPtr = ^MailCreateMailSlotPB;
  1321.     MailCreateMailSlotPB = RECORD
  1322.         qLink:                    Ptr;
  1323.         reservedH1:                LONGINT;
  1324.         reservedH2:                LONGINT;
  1325.         ioCompletion:            MSAMIOCompletionUPP;
  1326.         ioResult:                OSErr;
  1327.         saveA5:                    LONGINT;
  1328.         reqCode:                INTEGER;
  1329.         mailboxRef:                MailboxRef;
  1330.         timeout:                LONGINT;
  1331.         pmsamCID:                CreationID;
  1332.         smca:                    SMCA;
  1333.     END;
  1334.  
  1335.     MailModifyMailSlotPBPtr = ^MailModifyMailSlotPB;
  1336.     MailModifyMailSlotPB = RECORD
  1337.         qLink:                    Ptr;
  1338.         reservedH1:                LONGINT;
  1339.         reservedH2:                LONGINT;
  1340.         ioCompletion:            MSAMIOCompletionUPP;
  1341.         ioResult:                OSErr;
  1342.         saveA5:                    LONGINT;
  1343.         reqCode:                INTEGER;
  1344.         mailboxRef:                MailboxRef;
  1345.         timeout:                LONGINT;
  1346.         pmsamCID:                CreationID;
  1347.         smca:                    SMCA;
  1348.     END;
  1349.  
  1350.     MSAMParamPtr = ^MSAMParam;
  1351.     MSAMParam = RECORD
  1352.         CASE INTEGER OF
  1353.         0: (
  1354.             qLink:                Ptr;
  1355.             reservedH1:            LONGINT;
  1356.             reservedH2:            LONGINT;
  1357.             ioCompletion:        MSAMIOCompletionUPP;
  1358.             ioResult:            OSErr;
  1359.             saveA5:                LONGINT;
  1360.             reqCode:            INTEGER;
  1361.            );
  1362.         1: (
  1363.             pmsamGetMSAMRecord:    PMSAMGetMSAMRecordPB;
  1364.             );
  1365.         2: (
  1366.             pmsamOpenQueues:    PMSAMOpenQueuesPB;
  1367.             );
  1368.         3: (
  1369.             pmsamSetStatus:        PMSAMSetStatusPB;
  1370.             );
  1371.         4: (
  1372.             pmsamLogError:        PMSAMLogErrorPB;
  1373.             );
  1374.         5: (
  1375.             smsamSetup:            SMSAMSetupPB;
  1376.             );
  1377.         6: (
  1378.             smsamStartup:        SMSAMStartupPB;
  1379.             );
  1380.         7: (
  1381.             smsamShutdown:        SMSAMShutdownPB;
  1382.             );
  1383.         8: (
  1384.             msamEnumerate:        MSAMEnumeratePB;
  1385.             );
  1386.         9: (
  1387.             msamDelete:            MSAMDeletePB;
  1388.             );
  1389.         10: (
  1390.             msamOpen:            MSAMOpenPB;
  1391.             );
  1392.         11: (
  1393.             msamOpenNested:        MSAMOpenNestedPB;
  1394.             );
  1395.         12: (
  1396.             msamClose:            MSAMClosePB;
  1397.             );
  1398.         13: (
  1399.             msamGetMsgHeader:    MSAMGetMsgHeaderPB;
  1400.             );
  1401.         14: (
  1402.             msamGetAttributes:    MSAMGetAttributesPB;
  1403.             );
  1404.         15: (
  1405.             msamGetRecipients:    MSAMGetRecipientsPB;
  1406.             );
  1407.         16: (
  1408.             msamGetContent:        MSAMGetContentPB;
  1409.             );
  1410.         17: (
  1411.             msamGetEnclosure:    MSAMGetEnclosurePB;
  1412.             );
  1413.         18: (
  1414.             msamEnumerateBlocks: MSAMEnumerateBlocksPB;
  1415.             );
  1416.         19: (
  1417.             msamGetBlock:        MSAMGetBlockPB;
  1418.             );
  1419.         20: (
  1420.             msamMarkRecipients:    MSAMMarkRecipientsPB;
  1421.             );
  1422.         21: (
  1423.             msamnMarkRecipients: MSAMnMarkRecipientsPB;
  1424.             );
  1425.         22: (
  1426.             msamCreate:            MSAMCreatePB;
  1427.             );
  1428.         23: (
  1429.             msamBeginNested:    MSAMBeginNestedPB;
  1430.             );
  1431.         24: (
  1432.             msamEndNested:        MSAMEndNestedPB;
  1433.             );
  1434.         25: (
  1435.             msamSubmit:            MSAMSubmitPB;
  1436.             );
  1437.         26: (
  1438.             msamPutMsgHeader:    MSAMPutMsgHeaderPB;
  1439.             );
  1440.         27: (
  1441.             msamPutAttribute:    MSAMPutAttributePB;
  1442.             );
  1443.         28: (
  1444.             msamPutRecipient:    MSAMPutRecipientPB;
  1445.             );
  1446.         29: (
  1447.             msamPutContent:        MSAMPutContentPB;
  1448.             );
  1449.         30: (
  1450.             msamPutEnclosure:    MSAMPutEnclosurePB;                        {  this field is SYSTEM8_DEPRECATED }
  1451.             );
  1452.         31: (
  1453.             msamPutBlock:        MSAMPutBlockPB;
  1454.             );
  1455.         32: (
  1456.             msamCreateReport:    MSAMCreateReportPB;                        {  Reports and Error Handling Calls  }
  1457.             );
  1458.         33: (
  1459.             msamPutRecipientReport: MSAMPutRecipientReportPB;
  1460.             );
  1461.         34: (
  1462.             pmsamCreateMsgSummary: PMSAMCreateMsgSummaryPB;
  1463.             );
  1464.         35: (
  1465.             pmsamPutMsgSummary:    PMSAMPutMsgSummaryPB;
  1466.             );
  1467.         36: (
  1468.             pmsamGetMsgSummary:    PMSAMGetMsgSummaryPB;
  1469.             );
  1470.         37: (
  1471.             wakeupPMSAM:        MailWakeupPMSAMPB;
  1472.             );
  1473.         38: (
  1474.             createMailSlot:        MailCreateMailSlotPB;
  1475.             );
  1476.         39: (
  1477.             modifyMailSlot:        MailModifyMailSlotPB;
  1478.             );
  1479.     END;
  1480.  
  1481.  
  1482. CONST
  1483.     uppMSAMIOCompletionProcInfo = $00009802;
  1484.  
  1485. PROCEDURE CallMSAMIOCompletionProc(VAR paramBlock: MSAMParam; userRoutine: MSAMIOCompletionUPP);
  1486.     {$IFC NOT GENERATINGCFM}
  1487.     {To be implemented:  Glue to move parameters into registers.}
  1488.     {$ENDC}
  1489.  
  1490. FUNCTION NewMSAMIOCompletionProc(userRoutine: MSAMIOCompletionProcPtr): MSAMIOCompletionUPP;
  1491.     {$IFC NOT GENERATINGCFM }
  1492.     INLINE $2E9F;
  1493.     {$ENDC}
  1494. {  ASYNCHRONOUS ONLY, client must call WaitNextEvent  }
  1495. FUNCTION MailCreateMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1496.     {$IFC NOT GENERATINGCFM}
  1497.     INLINE $7001, $1F00, $3F3C, $052B, $AA5E;
  1498.     {$ENDC}
  1499. {  ASYNCHRONOUS ONLY, client must call WaitNextEvent  }
  1500. FUNCTION MailModifyMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1501.     {$IFC NOT GENERATINGCFM}
  1502.     INLINE $7001, $1F00, $3F3C, $052C, $AA5E;
  1503.     {$ENDC}
  1504. {  ASYNCHRONOUS ONLY, client must call WaitNextEvent  }
  1505. FUNCTION MailWakeupPMSAM(VAR paramBlock: MSAMParam): OSErr;
  1506.     {$IFC NOT GENERATINGCFM}
  1507.     INLINE $7001, $1F00, $3F3C, $0507, $AA5E;
  1508.     {$ENDC}
  1509. {  Personal MSAM Glue Routines  }
  1510. FUNCTION PMSAMOpenQueues(VAR paramBlock: MSAMParam): OSErr;
  1511.     {$IFC NOT GENERATINGCFM}
  1512.     INLINE $7000, $1F00, $3F3C, $0500, $AA5E;
  1513.     {$ENDC}
  1514. FUNCTION PMSAMSetStatus(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1515.     {$IFC NOT GENERATINGCFM}
  1516.     INLINE $3F3C, $0527, $AA5E;
  1517.     {$ENDC}
  1518. {  SYNC ONLY  }
  1519. FUNCTION PMSAMGetMSAMRecord(VAR paramBlock: MSAMParam): OSErr;
  1520.     {$IFC NOT GENERATINGCFM}
  1521.     INLINE $7000, $1F00, $3F3C, $0506, $AA5E;
  1522.     {$ENDC}
  1523. {  Server MSAM Glue Routines  }
  1524. {  SYNC ONLY  }
  1525. FUNCTION SMSAMSetup(VAR paramBlock: MSAMParam): OSErr;
  1526.     {$IFC NOT GENERATINGCFM}
  1527.     INLINE $7000, $1F00, $3F3C, $0523, $AA5E;
  1528.     {$ENDC}
  1529. {  SYNC ONLY  }
  1530. FUNCTION SMSAMStartup(VAR paramBlock: MSAMParam): OSErr;
  1531.     {$IFC NOT GENERATINGCFM}
  1532.     INLINE $7000, $1F00, $3F3C, $0501, $AA5E;
  1533.     {$ENDC}
  1534. FUNCTION SMSAMShutdown(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1535.     {$IFC NOT GENERATINGCFM}
  1536.     INLINE $3F3C, $0502, $AA5E;
  1537.     {$ENDC}
  1538. {  Get Interface Glue Routines  }
  1539. FUNCTION MSAMEnumerate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1540.     {$IFC NOT GENERATINGCFM}
  1541.     INLINE $3F3C, $0503, $AA5E;
  1542.     {$ENDC}
  1543. FUNCTION MSAMDelete(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1544.     {$IFC NOT GENERATINGCFM}
  1545.     INLINE $3F3C, $0504, $AA5E;
  1546.     {$ENDC}
  1547. FUNCTION MSAMMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1548.     {$IFC NOT GENERATINGCFM}
  1549.     INLINE $3F3C, $0505, $AA5E;
  1550.     {$ENDC}
  1551. FUNCTION MSAMnMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1552.     {$IFC NOT GENERATINGCFM}
  1553.     INLINE $3F3C, $0512, $AA5E;
  1554.     {$ENDC}
  1555. FUNCTION MSAMOpen(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1556.     {$IFC NOT GENERATINGCFM}
  1557.     INLINE $3F3C, $0508, $AA5E;
  1558.     {$ENDC}
  1559. FUNCTION MSAMOpenNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1560.     {$IFC NOT GENERATINGCFM}
  1561.     INLINE $3F3C, $0509, $AA5E;
  1562.     {$ENDC}
  1563. FUNCTION MSAMClose(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1564.     {$IFC NOT GENERATINGCFM}
  1565.     INLINE $3F3C, $050A, $AA5E;
  1566.     {$ENDC}
  1567. FUNCTION MSAMGetRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1568.     {$IFC NOT GENERATINGCFM}
  1569.     INLINE $3F3C, $050C, $AA5E;
  1570.     {$ENDC}
  1571. FUNCTION MSAMGetAttributes(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1572.     {$IFC NOT GENERATINGCFM}
  1573.     INLINE $3F3C, $050B, $AA5E;
  1574.     {$ENDC}
  1575. FUNCTION MSAMGetContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1576.     {$IFC NOT GENERATINGCFM}
  1577.     INLINE $3F3C, $050D, $AA5E;
  1578.     {$ENDC}
  1579. FUNCTION MSAMGetEnclosure(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1580.     {$IFC NOT GENERATINGCFM}
  1581.     INLINE $3F3C, $050E, $AA5E;
  1582.     {$ENDC}
  1583. FUNCTION MSAMEnumerateBlocks(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1584.     {$IFC NOT GENERATINGCFM}
  1585.     INLINE $3F3C, $050F, $AA5E;
  1586.     {$ENDC}
  1587. FUNCTION MSAMGetBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1588.     {$IFC NOT GENERATINGCFM}
  1589.     INLINE $3F3C, $0510, $AA5E;
  1590.     {$ENDC}
  1591. FUNCTION MSAMGetMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1592.     {$IFC NOT GENERATINGCFM}
  1593.     INLINE $3F3C, $0511, $AA5E;
  1594.     {$ENDC}
  1595. {  Put Interface Glue Routines  }
  1596. FUNCTION MSAMCreate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1597.     {$IFC NOT GENERATINGCFM}
  1598.     INLINE $3F3C, $0514, $AA5E;
  1599.     {$ENDC}
  1600. FUNCTION MSAMBeginNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1601.     {$IFC NOT GENERATINGCFM}
  1602.     INLINE $3F3C, $0515, $AA5E;
  1603.     {$ENDC}
  1604. FUNCTION MSAMEndNested(VAR paramBlock: MSAMParam): OSErr;
  1605.     {$IFC NOT GENERATINGCFM}
  1606.     INLINE $7000, $1F00, $3F3C, $0516, $AA5E;
  1607.     {$ENDC}
  1608. {   SYNCHRONOUS ONLY  }
  1609. FUNCTION MSAMSubmit(VAR paramBlock: MSAMParam): OSErr;
  1610.     {$IFC NOT GENERATINGCFM}
  1611.     INLINE $7000, $1F00, $3F3C, $0517, $AA5E;
  1612.     {$ENDC}
  1613. FUNCTION MSAMPutAttribute(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1614.     {$IFC NOT GENERATINGCFM}
  1615.     INLINE $3F3C, $0518, $AA5E;
  1616.     {$ENDC}
  1617. FUNCTION MSAMPutRecipient(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1618.     {$IFC NOT GENERATINGCFM}
  1619.     INLINE $3F3C, $0519, $AA5E;
  1620.     {$ENDC}
  1621. FUNCTION MSAMPutContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1622.     {$IFC NOT GENERATINGCFM}
  1623.     INLINE $3F3C, $051A, $AA5E;
  1624.     {$ENDC}
  1625. {   SYNCHRONOUS ONLY  }
  1626. FUNCTION MSAMPutEnclosure(VAR paramBlock: MSAMParam): OSErr;
  1627.     {$IFC NOT GENERATINGCFM}
  1628.     INLINE $7000, $1F00, $3F3C, $051B, $AA5E;
  1629.     {$ENDC}
  1630. FUNCTION MSAMPutBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1631.     {$IFC NOT GENERATINGCFM}
  1632.     INLINE $3F3C, $051C, $AA5E;
  1633.     {$ENDC}
  1634. FUNCTION MSAMPutMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1635.     {$IFC NOT GENERATINGCFM}
  1636.     INLINE $3F3C, $051D, $AA5E;
  1637.     {$ENDC}
  1638. {  Reports and Error Handling Glue Routines  }
  1639. FUNCTION MSAMCreateReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1640.     {$IFC NOT GENERATINGCFM}
  1641.     INLINE $3F3C, $051F, $AA5E;
  1642.     {$ENDC}
  1643. FUNCTION MSAMPutRecipientReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1644.     {$IFC NOT GENERATINGCFM}
  1645.     INLINE $3F3C, $0520, $AA5E;
  1646.     {$ENDC}
  1647. FUNCTION PMSAMLogError(VAR paramBlock: MSAMParam): OSErr;
  1648.     {$IFC NOT GENERATINGCFM}
  1649.     INLINE $7000, $1F00, $3F3C, $0521, $AA5E;
  1650.     {$ENDC}
  1651. {  MsgSummary Glue Routines  }
  1652. FUNCTION PMSAMCreateMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1653.     {$IFC NOT GENERATINGCFM}
  1654.     INLINE $3F3C, $0522, $AA5E;
  1655.     {$ENDC}
  1656. FUNCTION PMSAMPutMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1657.     {$IFC NOT GENERATINGCFM}
  1658.     INLINE $3F3C, $0525, $AA5E;
  1659.     {$ENDC}
  1660. FUNCTION PMSAMGetMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1661.     {$IFC NOT GENERATINGCFM}
  1662.     INLINE $3F3C, $0526, $AA5E;
  1663.     {$ENDC}
  1664. {$ENDC}
  1665. {$ALIGN RESET}
  1666. {$POP}
  1667.  
  1668. {$SETC UsingIncludes := OCEMailIncludes}
  1669.  
  1670. {$ENDC} {__OCEMAIL__}
  1671.  
  1672. {$IFC NOT UsingIncludes}
  1673.  END.
  1674. {$ENDC}
  1675.